<div class="box-body box">
    {% for key,item in data %}
        <div class="margin-top-{% if loop.first %}10{% else %}20{% endif %} margin-bottom">
            <div class="clearfix"></div>
            <img class="col-sm-4" src="{{ item['screen'] }}">
            <div class="col-sm-8">
                <h4 class="media-heading">{{ item['name'] }}</h4>
                <p>{{ item['description'] }}</p>
                <p>作用域：
                    {% for tagKey,tagName in item['controllers'] %}
                        <a class="btn btn-xs btn-{% if enableThemes[tagKey] is defined AND enableThemes[tagKey] == key %}success{% else %}default{% endif %}" value="recycle">{{ tagName }}
                            {% if enableThemes[tagKey] is defined AND enableThemes[tagKey] == key %}
                                <small>【已启用】</small>
                            {% endif %}
                        </a>
                    {% endfor %}
                </p>
                <div>
                    <div class="btn-group">
                        {% if item['project'] is defined AND item['project'] == 'core' %}
                            <a class="btn btn-default disabled" type="button">默认前台模板不可操作</a>
                        {% else %}
                            <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
                                操作 <span class="caret"></span>
                            </button>
                            <ul class="dropdown-menu" role="menu">
                                {% for controllersKey,controllersName in item['controllers'] %}
                                    {% if enableThemes[controllersKey] is defined AND enableThemes[controllersKey] == key %}
                                        <li>没有可操作项</li>
                                    {% else %}
                                        <li>
                                            <a href="{{ url(['for':'adminThemesEnable','theme':key]) }}">启用为：{{ controllersName }}</a>
                                        </li>
                                    {% endif %}
                                {% endfor %}
                            </ul>
                            <a data-target="#main" href="{{ url(['for':'adminThemesUninstall','theme':key]) }}" class="btn btn-danger" type="button">删除</a>
                        {% endif %}
                    </div>
                </div>
            </div>
            <div class="clearfix"></div>
        </div>
        <div class="clearfix"></div>
    {% endfor %}
</div>